#define _CRT_SECURE_NO_WARNINGS 1
struct ListNode* middleNode(struct ListNode* head) {
    struct ListNode* p1, * p2;
    p1 = p2 = head;
    if (head == NULL)
        return head;
    while (p2 && p2->next) {
        p1 = p1->next;
        p2 = p2->next->next;
    }
    return p1;
}